package com.lagou.utils;

import java.util.*;

/**
 * @author: jie.zhao
 * @create: 2021/01/31 18:59
 */
public class ParameterMappingTokenHandler implements TokenHandler {
    private List<ParameterMapping> parameterMappings = new ArrayList();

    public ParameterMappingTokenHandler() {

    }

    public List<ParameterMapping> getParameterMappings() {
        return this.parameterMappings;
    }

    public String handleToken(String content) {
        this.parameterMappings.add(this.buildParameterMapping(content));
        return "?";
    }

    private ParameterMapping buildParameterMapping(String content) {

        return new ParameterMapping(content);
    }

    public void setParameterMappings(List<ParameterMapping> parameterMappings) {
        this.parameterMappings = parameterMappings;
    }
}
